package com.Service.Impl;

import com.Mapper.okayapi_goodsMapper;
import com.Service.Okayapi_goodsService;
import com.entity.Okayapi_goods;
import com.utils.SqlSessionUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @Author: 冷俊杰
 * @Description: 商品实现
 * @DateTime: 2022/6/17 9:39
 **/
public class Okayapi_goodsServiceImpl implements Okayapi_goodsService {
    SqlSession sqlSession = SqlSessionUtils.getSqlSession();
    okayapi_goodsMapper Mapper = sqlSession.getMapper(okayapi_goodsMapper.class);

    public List<Okayapi_goods> GOODS_LIST() {
        return Mapper.GOODS_LIST();
    }

    public List<Okayapi_goods> Goods_ListById(Integer id) {
        return Mapper.Goods_ListById(id);
    }

    public int UpdateGoods(Okayapi_goods goods) {
        return Mapper.UpdateGoods(goods);
    }

    public int DeleteGoods(Okayapi_goods goods) {
        return Mapper.DeleteGoods(goods);
    }

    public List<Okayapi_goods> LISTgoods(String goods_name) {
        return Mapper.LISTgoods(goods_name);
    }

    public int insertGoods(Okayapi_goods goods) {
        return Mapper.insertGoods(goods);
    }
}